﻿<primitives:DialogBase x:Class="Neurotoxin.Godspeed.Shell.Views.Dialogs.ShutdownDialog"
                       xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                       xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                       xmlns:primitives="clr-namespace:Neurotoxin.Godspeed.Shell.Primitives"
                       xmlns:lex="http://wpflocalizeextension.codeplex.com"
                       xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
                       xmlns:c="clr-namespace:Neurotoxin.Godspeed.Shell.Constants"
                       lex:LocalizeDictionary.DesignCulture="en-US"
                       lex:ResxLocalizationProvider.DefaultAssembly="Neurotoxin.Godspeed.Shell"
                       lex:ResxLocalizationProvider.DefaultDictionary="Resources"
                       Width="520" Title="{Binding Title}">
    <Grid x:Name="LayoutRoot">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>

        <TextBlock Grid.Row="0" Margin="5,0,0,5" FontWeight="Bold" TextWrapping="Wrap" Text="{Binding Caption}" />
        <TextBlock Grid.Row="1" Margin="5,0,0,15" TextWrapping="Wrap" Text="{Binding Message}" />
        
        <StackPanel Grid.Row="2" HorizontalAlignment="Center" Orientation="Horizontal">
            <Button MinWidth="75" Padding="5,0,5,0" Content="{lex:Loc ShutdownDialogOptionNow}" Margin="5" Command="{Binding OkCommand}" CommandParameter="{Binding Mode}" x:Name="ShutdownNowButton" Visibility="{Binding IsBoth, Converter={StaticResource BoolToVis}, ConverterParameter=true}"/>
            <xctk:SplitButton MinWidth="75" Padding="5,0,5,0" Content="{lex:Loc ShutdownDialogOptionNow}" Margin="5" Command="{Binding OkCommand}" CommandParameter="{Binding Mode}" x:Name="ShutdownNowSplitButton" Visibility="{Binding IsBoth, Converter={StaticResource BoolToVis}}">
                <xctk:SplitButton.DropDownContent>
                    <StackPanel>
                        <MenuItem Header="{lex:Loc Neurotoxin.Godspeed.Shell:Resources:ShutdownDialogOptionNow}" Command="{Binding OkCommand}" CommandParameter="{x:Static c:Shutdown.Both}" />
                        <MenuItem Header="{lex:Loc Neurotoxin.Godspeed.Shell:Resources:ShutdownDialogOptionPCOnly}" Command="{Binding OkCommand}" CommandParameter="{x:Static c:Shutdown.PC}" />
                        <MenuItem Header="{lex:Loc Neurotoxin.Godspeed.Shell:Resources:ShutdownDialogOptionXboxOnly}" Command="{Binding OkCommand}" CommandParameter="{x:Static c:Shutdown.Xbox}" />
                    </StackPanel>
                </xctk:SplitButton.DropDownContent>
            </xctk:SplitButton>

            <Button Content="{lex:LocText Cancel}" Margin="5" MinWidth="75" Command="{Binding CancelCommand}"/>
        </StackPanel>
    </Grid>
</primitives:DialogBase>